package com.itheima.Test2;

public class Xiaohon implements Runnable{
    @Override
    public void run() {
        while (true){
            synchronized (Demo.lock){
                if (Demo.count==10){
                    break;
                }
                Demo.count--;
                System.out.println(Thread.currentThread().getName()+"送出,剩"+Demo.count);
            }
        }
    }
}
